package org.wattdepot.cli.commands;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import javax.xml.datatype.XMLGregorianCalendar;
import org.junit.Test;
/**
 * Contains methods for the ChartPower command.
 * 
 * @author Jarret Mizo, Shaun Ramento
 * 
 */
public class TestChartPower {
  /**
   * Tests the verifyStartDayEndDay method.
   * 
   * @throws Exception if there is an error.
   */
  @Test
  public void testChartPower() throws Exception {
    ChartPower chartPowerClass = new ChartPower();
    ValidateDay day = new ValidateDay();
    XMLGregorianCalendar startTime = day.validateDay("2009-10-28");
    XMLGregorianCalendar endTime = day.validateDay("2009-10-30");
    Boolean check;
    check = chartPowerClass.verifyStartEndDate(startTime, endTime);
    assertTrue("Checking correct input", check);
    
    check = chartPowerClass.verifyStartEndDate(endTime, startTime);
    assertFalse("Checking exchanced input", check);
    
  }
}
